public class Solution {
    public int[][] transpose(int[][] matrix) {
        int [][] transpose_ = new int[matrix[0].length][matrix.length];
        //先定义一个转置之后的矩阵,然后在通过两个for循环将数字交换

        for(int i = 0;i < matrix[0].length;i ++){
            for(int j = 0;j < matrix.length;j ++){
                transpose_[i][j] = matrix[j][i];
            }
        }
        return transpose_;
    }
}